Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try making SuperSocket.Kestrel support Detach #765

Merged
merged 6 commits into from
Dec 11, 2024

Conversation

wj8400684
Copy link
Contributor

No description provided.

@@ -412,5 +423,16 @@ protected void OnError(string message, Exception e = null)
else
Logger?.LogError(message);
}

protected void SupplyEnd()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods are not required by other derived classes, so probably you can leave them in KestrelPopeConnection.

if (Options.ReadAsDemand)
{
var defaultObjectPipe = new DefaultObjectPipeWithSupplyControl<TPackageInfo>();
_supplyController = defaultObjectPipe;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you don't have to do this. Because the packagePipe will be pass to KestrelPipeConnection eventually.

protected override Task StartInputPipeTask<TPackageInfo>(IObjectPipe<TPackageInfo> packagePipe,
CancellationToken cancellationToken)
{
cancellationToken.Register(SupplyEnd);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packagePipe can be read here, so yo don't need to define a field for packagePipe in the base class.

@kerryjiang
Copy link
Owner

Take a look at this branch:
https://github.com/kerryjiang/SuperSocket/commits/kestreldetach/

UpdateLastActiveTime();
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we cannot do supply control for kestrel, because the data flow network => read pipeline is out of our control. This place only can control the read from read pipeline.

@kerryjiang kerryjiang merged commit 4c671dd into kerryjiang:master Dec 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants